home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / os2 / plnk081.zip / pilot-link.0.8.1 / ietf2datebook.PL < prev    next >
Text File  |  1997-08-07  |  2KB  |  49 lines

  1. use Config;
  2. print $Config{startperl}, " -w\n";
  3. print <DATA>;
  4. __DATA__;
  5. # -*- perl -*-
  6. ######################################################################
  7. # ietf2datebook.pl -- Convert IETF agenda to suitable format for
  8. #              install-datebook 
  9. # Copyright (c) 1997 Tero Kivinen
  10. #
  11. # This is free software, licensed under the GNU Public License V2.
  12. # See the file COPYING for details.
  13. ######################################################################
  14. #         Program: ietf2datebook.pl
  15. #      $Source: /u/kivinen/pilot-link.0.8.0/RCS/ietf2datebook.pl,v $
  16. #      Author : $Author: kivinen $
  17. #
  18. #      (C) Tero Kivinen 1997 <kivinen@iki.fi>
  19. #
  20. #      Creation          : 03:20 Aug  8 1997 kivinen
  21. #      Last Modification : 04:13 Aug  8 1997 kivinen
  22. #      Last check in     : $Date: 1997/08/08 04:30:32 $
  23. #      Revision number   : $Revision: 1.1 $
  24. #      State             : $State: Exp $
  25. #      Version        : 1.4
  26. #      Edit time        : 3 min
  27. #
  28. #      Description       : Convert IETF agenda to suitable format for
  29. #                        install-datebook 
  30. #
  31. ######################################################################
  32.  
  33. while (<>) {
  34.     chomp;
  35.     if (/^(MONDAY|TUESDAY|WEDNESDAY|THURSDAY|FRIDAY|SATURDAY|SUNDAY)\s*,\s*(January|February|March|April|June|July|August|September|October|November|December)\s*(\d+)\s*,\s*(\d+)\s*$/) {
  36.     $date = "$2 $3, $4";
  37.     } elsif (/^(\d\d\d\d)-(\d\d\d\d)\s*(.*)$/) {
  38.     $timestart = $1;
  39.     $timeend = $2;
  40.     $header = $3;
  41.     printf("$date $timestart GMT+300\t$date $timeend GMT+300\t\t$header\n");
  42.     } elsif (/^\s*$/) {
  43.     } elsif (/^\s*(.*)$/) {
  44.     printf("$date $timestart GMT+300\t$date $timeend GMT+300\t\t$header: $1\n");
  45.     } else {
  46.     die "Internal error";
  47.     }
  48. }
  49.